package cn.jetpiece.cloud.dict.app.modular.dict.mapper;

import cn.jetpiece.cloud.dict.app.modular.dict.entity.DictItem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author hancp
 * @version 1.0
 * @description: Mapper 接口
 * @date 2021-11-08 10:15:39
 */
public interface DictItemMapper extends BaseMapper<DictItem> {

    /**
     * @param mainId
     * @return
     */
    @Select("SELECT * FROM sys_dict_item WHERE dict_id = #{mainId} order by sort_order asc, item_value asc")
    List<DictItem> selectItemsByMainId(Long mainId);
}
